#include <windows.h>

int main(){
	POINT p;
	GetCursorPos(&p);
	INPUT ipt[1];
	ZeroMemory(ipt, sizeof(ipt));
	ipt[0].type = INPUT_MOUSE;
	ipt[0].mi.dx = p.x;
	ipt[0].mi.dy = p.y;
	ipt[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
	
	SendInput(1, ipt, sizeof(INPUT));
	Sleep(20);
	ipt[0].mi.dwFlags = MOUSEEVENTF_LEFTUP;
	SendInput(1, ipt, sizeof(INPUT));
}
